package com.example;

import de.greenrobot.daogenerator.DaoGenerator;
import de.greenrobot.daogenerator.Entity;
import de.greenrobot.daogenerator.Schema;

public class MyClass {

    public static void main(String[] args){
        Schema schema = new Schema(1,
                "com.lanou.myim.db");
        Entity conversationEty = schema.addEntity("ConversationEty");
        conversationEty.addLongProperty("_id").primaryKey().autoincrement();
        conversationEty.addStringProperty("account");
        conversationEty.addStringProperty("userName");
        conversationEty.addStringProperty("body");
        conversationEty.addLongProperty("time");

        Entity applyEty = schema.addEntity("ApplyEty");
        applyEty.addLongProperty("_id").primaryKey().autoincrement();
        applyEty.addStringProperty("account");
        applyEty.addStringProperty("userName");
        applyEty.addStringProperty("reason");
        applyEty.addBooleanProperty("answer");
        try {
            new DaoGenerator().generateAll(schema,"./app/src/main/java");
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

}
